<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器</title>
    <style>
        b{
            color: coral;
            background-color: aquamarine;
        }
        /*id选择器*/
        #d1{
            color: coral;
        }
        /*类选择器*/
        .c1{
            color: deeppink;
        }
        /*分组选择器*/
        #d1,.c1{
            background-color: cyan;
        }
        /*属性选择器*/
        [type]{
            color: cadetblue;
        }
        [type='text']{
            background-color: antiquewhite;
        }
        /*任意元素选择器*/
        *{
            border: 1px solid red;
        }
    </style>
</head>
<body>
<center>
    <div id="d1">林黛玉</div>
    <div>王熙凤</div>
    <div class="c1">薛宝钗</div>
    <div>贾宝玉</div>
    <span class="c1">贾元春</span>
    <span>贾迎<b>春</b></span>
    <span><b>贾</b>探春</span>
    <span class="c1">贾惜春</span>
    <div class="c1">?</div>
    账号:<input type="text">
    密码:<input type="text">
</center>
</body>
</html>